home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 2: CDPD 1 / Almathera Ten on Ten - Disc 2: CDPD 1.iso / pd / 026-050 / 049 / qmouse / lacetogl.asm < prev    next >
Assembly Source File  |  1995-03-13  |  3KB  |  82 lines

  1.          PLEN 60
  2. **********************************************************************
  3. *    Program: LACETOGL- A CLI program to force interlace mode on/off.
  4. *    Author:  Robert Rethemeyer, Sunnyvale, CA  (thru BBS-HT)
  5. *    Date:    07/22/86
  6. *    Status:  RELEASED TO THE PUBLIC DOMAIN, "AS-IS"
  7. **********************************************************************
  8. * This program is modeled after the "SETLACE" C program by
  9. * Bob Pariseau on Fish disk #9.  The advantage of LACETOGL is its
  10. * small size: 248 bytes instead of 15504 for SETLACE.  It takes up only
  11. * one block of space on your workbench disk.  This program works with
  12. * either DOS 1.1 or 1.2, however with 1.2 it has no effect if the
  13. * Workbench Interlace preference is already on.  For more information,
  14. * refer to the documentation accompanying the SETLACE program.
  15. *
  16. * To use this program, just execute it from a CLI.  If interlace mode
  17. * is off, it will be turned on; if it is already on, it is turned off.
  18. * It prints the message "Interlace Toggled" if successful.
  19. **********************************************************************
  20.          NOLIST
  21.   INCLUDE "exec/types.i"
  22.   INCLUDE "libraries/dos_lib.i"
  23.   INCLUDE "graphics/gfxbase.i"
  24.   INCLUDE "graphics/display.i"
  25.          LIST
  26. ExecBase EQU  4
  27.          XREF  _LVOOpenLibrary
  28.          XREF  _LVOCloseLibrary
  29.          XREF  _LVORemakeDisplay
  30. **********************************************************************
  31. LaceTogl:
  32.          MOVE.L  ExecBase,a6
  33. *                                   OPEN DOS LIBRARY
  34.          LEA     doslib(pc),a1
  35.          MOVEQ   #0,d0
  36.          JSR     _LVOOpenLibrary(a6)
  37.          MOVE.L  d0,a4
  38.          BEQ.S   broke1
  39. *                                   OPEN GRAPHICS LIBRARY
  40.          LEA     gfxlib(pc),a1
  41.          MOVEQ   #0,d0
  42.          JSR     _LVOOpenLibrary(a6)
  43.          MOVE.L  d0,a5
  44.          BEQ.S   broke2
  45. *                                   OPEN INTUITION LIBRARY
  46.          LEA     intlib(pc),a1
  47.          MOVEQ   #0,d0
  48.          JSR     _LVOOpenLibrary(a6)
  49.          MOVE.L  d0,a3
  50.          BEQ.S   broke3
  51. *                                   TOGGLE INTERLACE MODE
  52.          EOR.W   #INTERLACE,gb_system_bplcon0(a5)
  53.          MOVE.L  a3,a6
  54.          JSR     _LVORemakeDisplay(a6)
  55.          MOVE.L  ExecBase,a6
  56. *                                   PRINT SUCCESS MESSAGE
  57.          JSR     _LVOOutput(a4)
  58.          MOVE.L  d0,d1
  59.          LEA     mesg(pc),a2
  60.          MOVE.L  a2,d2
  61.          MOVEQ   #18,d3
  62.          JSR     _LVOWrite(a4)
  63. *                                   CLEAN UP AND RETURN
  64.          MOVE.L  a3,a1
  65.          JSR     _LVOCloseLibrary(a6)
  66. broke3   MOVE.L  a5,a1
  67.          JSR     _LVOCloseLibrary(a6)
  68. broke2   MOVE.L  a4,a1
  69.          JSR     _LVOCloseLibrary(a6)
  70. broke1   MOVEQ   #0,d0
  71.          RTS                        ALL DONE
  72. ************************************************************       
  73.          CNOP    0,2
  74. mesg     DC.B    'Interlace Toggled',10
  75.          CNOP    0,2
  76. doslib   DC.B    'dos.library',0
  77.          CNOP    0,2
  78. gfxlib   DC.B    'graphics.library',0
  79.          CNOP    0,2
  80. intlib   DC.B    'intuition.library',0
  81.          END
  82.